云服务器

推荐列表 站点导航

当前位置:首页 > 服务器技术 > 云服务器 >

服务器_discuz x2 多服务器伪静态规则,Apache Web Server(独立主机用户)

来源:网络整理  作者:  发布时间:2020-12-21 22:01
discuz x2 多服务器伪静态规则,Apache Web Server(独立主机用户) 复制代码代码如下: IfModule mod_rewrite.c RewriteEngine On RewriteCo...

复制代码

set URL = $1/portal.php?mod=topic&topic=$2&$3
<rewrite>
RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
<match url="^(.*/)*blog-([0-9]+)-([0-9]+).html\?*(.*)$" />
if (!-e $request_filename) {

复制代码

<rule>
if matched then
RewriteCond %{QUERY_STRING} ^(.*)$
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
if matched then
<action type="Rewrite" url="{R:1}/index.php\?action={R:2}&amp;value={R:3}&amp;{R:4}" />
<action type="Rewrite" url="{R:1}/forum.php\?mod=viewthread&amp;tid={R:2}&amp;extra=page%3D{R:4}&amp;page={R:3}&amp;{R:5}" />
<rule>
RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;

</rules>
</rule>
<rule>

复制代码

RewriteCond %{QUERY_STRING} ^(.*)$
<action type="Rewrite" url="{R:1}/forum.php\?mod=group&amp;fid={R:2}&amp;page={R:3}&amp;{R:4}" />
Apache Web Server(虚拟主机用户)
if matched then
match URL into $ with ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$
</rule>
<match url="^(.*/)*article-([0-9]+)-([0-9]+).html\?*(.*)$" />
RewriteCond %{QUERY_STRING} ^(.*)$
<match url="^(.*/)*thread-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
<match url="^(.*/)*(fid|tid)-([0-9]+).html\?*(.*)$" />
RewriteCond %{QUERY_STRING} ^(.*)$
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
<rule>
CacheClockRate 3600
match URL into $ with ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$
match URL into $ with ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$
RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
<rule>

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

<rules>

<action type="Rewrite" url="{R:1}/portal.php\?mod=topic&amp;topic={R:2}&amp;{R:3}" />
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1
<match url="^(.*/)*forum-(\w+)-([0-9]+).html\?*(.*)$" />


IIS7 Web Server(独立主机用户)
RewriteCond %{QUERY_STRING} ^(.*)$
set URL = $1/index.php?action=$2&value=$3&$4
RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1
RewriteBase /discuz

Apache Web Server(独立主机用户)
RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/portal\.php\?mod=view&aid=$2&page=$3&$5



RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
<match url="^(.*/)*group-([0-9]+)-([0-9]+).html\?*(.*)$" />
Zeus Web Server

代码如下:

rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
代码如下:

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$5

复制代码

</rule>
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/topic-(.+)\.html(\?(.*))*$ $1/portal\.php\?mod=topic&topic=$2&$4
endif
RewriteCond %{QUERY_STRING} ^(.*)$
</rule>
endif


RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
endif
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$6
代码如下:


return 404;
RewriteCond %{QUERY_STRING} ^(.*)$
match URL into $ with ^(.*)/blog-([0-9]+)-([0-9]+)\.html\?*(.*)$
代码如下:

if matched then


set URL = $1/home.php?mod=space&$2=$3&$4
if matched then
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3&%1
</rewrite>
RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/home\.php\?mod=space&uid=$2&do=blog&id=$3&$5

复制代码

if matched then

RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3&%1

# 3600 = 1 hour
set URL = $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5

set URL = $1/home.php?mod=space&uid=$2&do=blog&id=$3&$4
IIS Web Server(独立主机用户)
set URL = $1/portal.php?mod=view&aid=$2&page=$3&$4
match URL into $ with ^(.*)/article-([0-9]+)-([0-9]+)\.html\?*(.*)$
endif
</rule>
endif
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&%1
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=group&fid=$2&page=$3&$5
endif
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3&%1


<rule>
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
endif


RewriteCond %{QUERY_STRING} ^(.*)$
<match url="^(.*/)*topic-(.+).html\?*(.*)$" />
</rule>
match URL into $ with ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$
endif
if matched then
代码如下:

</IfModule>
match URL into $ with ^(.*)/(fid|tid)-([0-9]+)\.html\?*(.*)$
</rule>
<IfModule mod_rewrite.c>
if matched then
<action type="Rewrite" url="{R:1}/portal.php\?mod=view&amp;aid={R:2}&amp;page={R:3}&amp;{R:4}" />
RewriteCond %{QUERY_STRING} ^(.*)$

# 将 RewriteEngine 模式打开

<match url="^(.*/)*space-(username|uid)-(.+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/home.php\?mod=space&amp;{R:2}={R:3}&amp;{R:4}" />
代码如下:

RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html(\?(.*))*$ $1/index\.php\?action=$2&value=$3&$5
match URL into $ with ^(.*)/topic-(.+)\.html\?*(.*)$
[ISAPI_Rewrite]
Nginx Web Server
</rule>
set URL = $1/forum.php?mod=group&fid=$2&page=$3&$4
RewriteEngine On
<rule>
rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last;
}
RepeatLimit 32
rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
<action type="Rewrite" url="{R:1}/home.php\?mod=space&amp;uid={R:2}&amp;do=blog&amp;id={R:3}&amp;{R:4}" />
# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3&%1
set URL = $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4
<action type="Rewrite" url="{R:1}/forum.php\?mod=forumdisplay&amp;fid={R:2}&amp;page={R:3}&amp;{R:4}" />
# Rewrite 系统规则请勿修改
RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2&%1

复制代码

<rule>
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html(\?(.*))*$ $1/home\.php\?mod=space&$2=$3&$5
RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&%1

相关热词: 服务器 discuz 主机

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://v30.fanwenzhu.com/server/yun/6807.shtml

最新文章
租用云服务器后的备案问 租用云服务器后的备案问

时间:2021-01-05

百度云服务器bcc有什么优 百度云服务器bcc有什么优

时间:2021-01-05

什么是云服务器cvm?怎么 什么是云服务器cvm?怎么

时间:2021-01-05

云服务器怎么保证信息安 云服务器怎么保证信息安

时间:2021-01-05

云服务器怎么预防被攻击 云服务器怎么预防被攻击

时间:2021-01-05

阿里云ECS实例设置用户r 阿里云ECS实例设置用户r

时间:2020-12-29

阿里云ECS服务器入门使用 阿里云ECS服务器入门使用

时间:2020-12-29

怎么配置云服务器 怎么配置云服务器

时间:2020-12-28

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

服务器_discuz x2 多服务器伪静态规则,Apache Web Server(独立主机用户)

2020-12-21 编辑:

复制代码

set URL = $1/portal.php?mod=topic&topic=$2&$3
<rewrite>
RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
<match url="^(.*/)*blog-([0-9]+)-([0-9]+).html\?*(.*)$" />
if (!-e $request_filename) {

复制代码

<rule>
if matched then
RewriteCond %{QUERY_STRING} ^(.*)$
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
if matched then
<action type="Rewrite" url="{R:1}/index.php\?action={R:2}&amp;value={R:3}&amp;{R:4}" />
<action type="Rewrite" url="{R:1}/forum.php\?mod=viewthread&amp;tid={R:2}&amp;extra=page%3D{R:4}&amp;page={R:3}&amp;{R:5}" />
<rule>
RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;

</rules>
</rule>
<rule>

复制代码

RewriteCond %{QUERY_STRING} ^(.*)$
<action type="Rewrite" url="{R:1}/forum.php\?mod=group&amp;fid={R:2}&amp;page={R:3}&amp;{R:4}" />
Apache Web Server(虚拟主机用户)
if matched then
match URL into $ with ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$
</rule>
<match url="^(.*/)*article-([0-9]+)-([0-9]+).html\?*(.*)$" />
RewriteCond %{QUERY_STRING} ^(.*)$
<match url="^(.*/)*thread-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
<match url="^(.*/)*(fid|tid)-([0-9]+).html\?*(.*)$" />
RewriteCond %{QUERY_STRING} ^(.*)$
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
<rule>
CacheClockRate 3600
match URL into $ with ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$
match URL into $ with ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$
RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
<rule>

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

<rules>

<action type="Rewrite" url="{R:1}/portal.php\?mod=topic&amp;topic={R:2}&amp;{R:3}" />
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1
<match url="^(.*/)*forum-(\w+)-([0-9]+).html\?*(.*)$" />


IIS7 Web Server(独立主机用户)
RewriteCond %{QUERY_STRING} ^(.*)$
set URL = $1/index.php?action=$2&value=$3&$4
RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1
RewriteBase /discuz

Apache Web Server(独立主机用户)
RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/portal\.php\?mod=view&aid=$2&page=$3&$5



RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
<match url="^(.*/)*group-([0-9]+)-([0-9]+).html\?*(.*)$" />
Zeus Web Server

代码如下:

rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
代码如下:

RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$5

复制代码

</rule>
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/topic-(.+)\.html(\?(.*))*$ $1/portal\.php\?mod=topic&topic=$2&$4
endif
RewriteCond %{QUERY_STRING} ^(.*)$
</rule>
endif


RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
endif
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$6
代码如下:


return 404;
RewriteCond %{QUERY_STRING} ^(.*)$
match URL into $ with ^(.*)/blog-([0-9]+)-([0-9]+)\.html\?*(.*)$
代码如下:

if matched then


set URL = $1/home.php?mod=space&$2=$3&$4
if matched then
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3&%1
</rewrite>
RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/home\.php\?mod=space&uid=$2&do=blog&id=$3&$5

复制代码

if matched then

RewriteRule ^(.*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3&%1

# 3600 = 1 hour
set URL = $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5

set URL = $1/home.php?mod=space&uid=$2&do=blog&id=$3&$4
IIS Web Server(独立主机用户)
set URL = $1/portal.php?mod=view&aid=$2&page=$3&$4
match URL into $ with ^(.*)/article-([0-9]+)-([0-9]+)\.html\?*(.*)$
endif
</rule>
endif
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&%1
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html(\?(.*))*$ $1/forum\.php\?mod=group&fid=$2&page=$3&$5
endif
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3&%1


<rule>
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
endif


RewriteCond %{QUERY_STRING} ^(.*)$
<match url="^(.*/)*topic-(.+).html\?*(.*)$" />
</rule>
match URL into $ with ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$
endif
if matched then
代码如下:

</IfModule>
match URL into $ with ^(.*)/(fid|tid)-([0-9]+)\.html\?*(.*)$
</rule>
<IfModule mod_rewrite.c>
if matched then
<action type="Rewrite" url="{R:1}/portal.php\?mod=view&amp;aid={R:2}&amp;page={R:3}&amp;{R:4}" />
RewriteCond %{QUERY_STRING} ^(.*)$

# 将 RewriteEngine 模式打开

<match url="^(.*/)*space-(username|uid)-(.+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/home.php\?mod=space&amp;{R:2}={R:3}&amp;{R:4}" />
代码如下:

RewriteRule ^(.*)/(fid|tid)-([0-9]+)\.html(\?(.*))*$ $1/index\.php\?action=$2&value=$3&$5
match URL into $ with ^(.*)/topic-(.+)\.html\?*(.*)$
[ISAPI_Rewrite]
Nginx Web Server
</rule>
set URL = $1/forum.php?mod=group&fid=$2&page=$3&$4
RewriteEngine On
<rule>
rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last;
}
RepeatLimit 32
rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last;
<action type="Rewrite" url="{R:1}/home.php\?mod=space&amp;uid={R:2}&amp;do=blog&amp;id={R:3}&amp;{R:4}" />
# 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3&%1
set URL = $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$4
<action type="Rewrite" url="{R:1}/forum.php\?mod=forumdisplay&amp;fid={R:2}&amp;page={R:3}&amp;{R:4}" />
# Rewrite 系统规则请勿修改
RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2&%1

复制代码

<rule>
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html(\?(.*))*$ $1/home\.php\?mod=space&$2=$3&$5
RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&%1

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://v30.fanwenzhu.com/server/yun/6807.shtml

相关文章

风云图片

推荐阅读

返回云服务器频道首页